<?php
/**
 * User: micah <micah.shi@gmail.com>
 * Date: 11-8-21
 * Time: 下午8:20
 * Desc: userService factory
 */
final class UserServiceFactory
{
	private static $instance = null;
	private static $serviceSet = array();

	private function __construct () {
	}

	public static function getInstance () {
		if (!self::$instance) {
			self::$instance = new UserFactory();
		}
		return self::$instance;
	}
	public function createUserService()
	{
		if (!isset(self::$serviceSet['userService']) || !self::$serviceSet['userService']) {
			require_once dirname(__FILE__) . "/UserService.php";
			self::$serviceSet['userService'] = new UserService();
		}
		return self::$serviceSet['userService'];
	}
}

?>
